<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="汇总采购计划" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="addApply()"
                            ng-disabled="!btnPermission.purchasePlanAgentSummaryAdd" title="{{!btnPermission.purchasePlanAgentSummaryAdd?'无权限执行此操作':''}}">新增</button>
                    <button class="btn btn-operate m-r-sm" ng-click="import()"
                            ng-disabled="!btnPermission.purchasePlanAgentSummaryImport" title="{{!btnPermission.purchasePlanAgentSummaryImport?'无权限执行此操作':''}}">导入</button>
                </div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" title="配置表格列"
                                ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>

                        <button type="button" yb-download download-url="exportParam.allUrl" download-param="condition" download-duration="3" class="btn btn-default base-color" title="导出"
                                ng-if="!!btnPermission.purchasePlanAgentSummaryExport">
                            <i class="yb-icon ico-export-o"></i>
                        </button>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')">高级搜索</button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="计划单号"
                               ng-model="condition.planNo">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)" reset-data="reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label">计划单号：</label>
                        <input type="text" name="planNo" ng-model="condition.planNo" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">采购类型：</label>
                        <select ng-model="condition.typeId" class="form-control"
                                ng-options="item.id as item.name for item in typeDescList">
                            <option value="">请选择</option>
                        </select>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">状态：</label>
                        <select ng-model="condition.status" class="form-control"
                                ng-options="item.id as item.name for item in statusList">
                            <option value="">请选择</option>
                        </select>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">制单人：</label>
                        <input type="text" name="createName" ng-model="condition.createName" class="form-control">
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label">制单时间：</label>
                        <input type="text" class="form-control date-picker" ng-model="condition.startCreateTime"
                               datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="switchDataPicker(0)" is-open="datePickerFlag[0]" close-text="关闭"
                               ng-change="checkDate(condition, 'startCreateTime', 'endCreateTime')" modal-size="small" readonly>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"></label>
                        <label class="control-label wave-line">~</label>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"></label>
                        <input type="text" class="form-control date-picker" ng-model="condition.endCreateTime"
                               datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="switchDataPicker(1)" is-open="datePickerFlag[1]" close-text="关闭"
                               ng-change="checkDate(condition, 'startCreateTime', 'endCreateTime')" modal-size="small" readonly>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">审核人：</label>
                        <input type="text" name="auditName" ng-model="condition.auditName" class="form-control">
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label">审核时间：</label>
                        <input type="text" class="form-control date-picker" ng-model="condition.startAuditTime"
                               datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="switchDataPicker(0)" is-open="datePickerFlag[0]" close-text="关闭"
                               ng-change="checkDate(condition, 'startAuditTime', 'endAuditTime')" modal-size="small" readonly>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"></label>
                        <label class="control-label wave-line">~</label>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"></label>
                        <input type="text" class="form-control date-picker" ng-model="condition.endAuditTime"
                               datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="switchDataPicker(1)" is-open="datePickerFlag[1]" close-text="关闭"
                               ng-change="checkDate(condition, 'startAuditTime', 'endAuditTime')" modal-size="small" readonly>
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tableConfig" col-fixed="true"
                 has-check-col="true" set-tb-style="setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="toSort(tableConfig.tableCol, $index)" ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.fixedWidth" fixed-width="tbStyle.billFixedWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="toSort(tableConfig.tableCol, $index)" ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index" ng-class="{'row-selected': $index === markInfo.cueRow}" ng-click="selectRow($index)">
                                <td class="spill-dots border-l-none border-r-none" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                    width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    <span ng-if="(!itemCol.clickFn && itemCol.type !== 'operate') || !!itemCol.clickFn && itemCol.type == 'synSap' && item[itemCol.dataField] !== '同步失败'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="itemCol.type != 'attach' && ((!!itemCol.clickFn && itemCol.type != 'synSap') || (!!itemCol.clickFn && itemCol.type == 'synSap' && item[itemCol.dataField] === '同步失败'))">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="itemCol.type == 'attach' && !!item[itemCol.dataField]">
                                        点击下载
                                    </a>
                                    <div class="font-0" ng-if="itemCol.type === 'operate'">
                                        <button type="button" class="btn btn-operate m-r-xs" ng-click="editApply(item)"
                                                ng-disabled="!(item.status===statusEnum.Draft||item.status===statusEnum.BackEdit)||!btnPermission.purchasePlanAgentSummaryEdit"
                                                title="{{!btnPermission.purchasePlanAgentSummaryEdit?'无权限执行此操作':''}}">编辑</button>
                                        <button type="button" class="btn btn-operate m-r-xs" ng-click="delApply(item)"
                                                ng-disabled="!(item.status===statusEnum.Draft||item.status===statusEnum.BackEdit||item.status===statusEnum.ToBeAudited)||!btnPermission.purchasePlanAgentSummaryDel"
                                                title="{{!btnPermission.purchasePlanAgentSummaryDel?'无权限执行此操作':''}}">删除</button>
                                        <button type="button" class="btn btn-operate m-r-xs" ng-click="auditApply(item)"
                                                ng-disabled="!(item.status===statusEnum.ToBeAudited)||!btnPermission.purchasePlanAgentSummaryAudit"
                                                title="{{!btnPermission.purchasePlanAgentSummaryAudit?'无权限执行此操作':''}}">审核</button>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index" ng-class="{'row-selected': $index === markInfo.cueRow}"
                                ng-click="selectRow($index)">
                                <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !itemCol.isFixed" title="{{item[itemCol.dataField]}}">
                                    <span ng-if="(!itemCol.clickFn && itemCol.type !== 'operate') || !!itemCol.clickFn && itemCol.type == 'synSap' && item[itemCol.dataField] !== '同步失败'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="itemCol.type != 'attach' && ((!!itemCol.clickFn && itemCol.type != 'synSap') || (!!itemCol.clickFn && itemCol.type == 'synSap' && item[itemCol.dataField] === '同步失败'))">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="itemCol.type == 'attach' && !!item[itemCol.dataField]">
                                        点击下载
                                    </a>
                                    <div class="font-0" ng-if="itemCol.type === 'operate'">
                                        <button type="button" class="btn btn-operate m-r-xs" ng-click="auditApply(item)"
                                                ng-disabled="item.invalid === 1 || item.status > 1 || !btnPermission.backOrderPrint" title="{{!btnPermission.backOrderPrint?'无权限执行此操作':''}}">打印</button>
                                        <button type="button" class="btn btn-operate m-r-xs" ng-click="editApply(item)"
                                                ng-disabled="item.invalid === 1 || item.sendStatus > 0 || !btnPermission.backOrderEdit" title="{{!btnPermission.backOrderEdit?'无权限执行此操作':''}}">编辑</button>
                                        <button type="button" class="btn btn-operate m-r-xs" ng-click="delApply(item)"
                                                ng-disabled="item.invalid === 1 || item.status === 4 || !btnPermission.backOrderDel" title="{{!btnPermission.backOrderDel?'无权限执行此操作':''}}">删除</button>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
        <div tab heading="{{tabFlag.name}}" active="activeFlag[2]" ng-if="activeFlag[2]">

            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-12">
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AgentStorePlan')">高级搜索</button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="计划单号"
                               ng-model="condition.planNo">
                        <span class="input-group-addon cursor-pointer" ng-click="getGenOrderList(1)">搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAgentStorePlan" search-data="getGenOrderList(1)" reset-data="reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label">计划单号：</label>
                        <input type="text" name="planNo" ng-model="condition.planNo" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">采购类型：</label>
                        <select ng-model="condition.typeId" class="form-control"
                                ng-options="item.id as item.name for item in typeDescList">
                            <option value="">请选择</option>
                        </select>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">制单人：</label>
                        <input type="text" name="createName" ng-model="condition.createName" class="form-control">
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label">制单时间：</label>
                        <input type="text" class="form-control date-picker" ng-model="condition.startCreateTime"
                               datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="switchDataPicker(0)" is-open="datePickerFlag[0]" close-text="关闭"
                               ng-change="checkDate(condition, 'startCreateTime', 'endCreateTime')" modal-size="small" readonly>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"></label>
                        <label class="control-label wave-line">~</label>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"></label>
                        <input type="text" class="form-control date-picker" ng-model="condition.endCreateTime"
                               datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="switchDataPicker(1)" is-open="datePickerFlag[1]" close-text="关闭"
                               ng-change="checkDate(condition, 'startCreateTime', 'endCreateTime')" modal-size="small" readonly>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">审核人：</label>
                        <input type="text" name="auditName" ng-model="condition.auditName" class="form-control">
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label">审核时间：</label>
                        <input type="text" class="form-control date-picker" ng-model="condition.startAuditTime"
                               datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="switchDataPicker(0)" is-open="datePickerFlag[0]" close-text="关闭"
                               ng-change="checkDate(condition, 'startAuditTime', 'endAuditTime')" modal-size="small" readonly>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"></label>
                        <label class="control-label wave-line">~</label>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"></label>
                        <input type="text" class="form-control date-picker" ng-model="condition.endAuditTime"
                               datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="switchDataPicker(1)" is-open="datePickerFlag[1]" close-text="关闭"
                               ng-change="checkDate(condition, 'startAuditTime', 'endAuditTime')" modal-size="small" readonly>
                    </div>
                </div>
            </div>

            <div class="main-area d-b-60" style="top:95px;">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{materielTableConfig.scrollWidth}}">
                            <thead>
                            <tr>
                                <th width="40" class="th-check text-center">
                                    <div yb-check-box yb-checked="markInfo.allCheckedMaterial" yb-click="selectAll(orderObj.materialList, 'Material')"></div>
                                </th>
                                <th ng-repeat="itemCol in materielTableConfig.tableCol track by $index" ng-if="itemCol.type !== 'rowNo'" width="{{itemCol.width}}">
                                    <div yb-thead-operate ng-model="itemCol" target-width="materielTableConfig.targetWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="orderObj.materialList.length > 0">
                        <table class="table-fixed border-none" width="{{materielTableConfig.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in orderObj.materialList track by $index">
                                <td width="40" class="text-center">
                                    <div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item, orderObj.materialList, 'Material')"></div>
                                </td>
                                <td ng-repeat="itemCol in materielTableConfig.tableCol track by $index" width="{{itemCol.width}}"
                                    title="{{item[itemCol.dataField]}}">
                                    <div class="spill-dots" ng-if="!itemCol.needInput">
                                        {{item[itemCol.dataField]}}
                                    </div>
                                    <div ng-if="!!itemCol.needInput && itemCol.inputType === 'qty'" class="td-edit pos-r">
                                        <input type="text" class="form-control" ng-model="item[itemCol.dataField]"
                                               ng-change="countTotal(item)" yb-number-input max="99999.999" disable-decimal="false" decimal-places="3"
                                               ng-class="{'error': item.qtyErr}">
                                        <div class="pos-a tool-tips" ng-if="!!item.qtyErr">
                                            <i class="triangle"></i>
                                            <div class="msg">数量不能为空和0</div>
                                        </div>
                                    </div>
                                    <div ng-if="!!itemCol.needInput && itemCol.inputType === 'price'" class="td-edit pos-r">
                                        <input type="text" class="form-control" ng-model="item[itemCol.dataField]"
                                               ng-change="countTotal(item)" yb-number-input max="99999999.99" disable-decimal="false" decimal-places="2"
                                               ng-class="{'error': item.priceErr}">
                                        <div class="pos-a tool-tips" ng-if="!!item.priceErr">
                                            <i class="triangle"></i>
                                            <div class="msg">单价不能为空和0</div>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="orderObj.materialList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="addPageInfo" yb-refresh="getGenOrderList()"></div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix" style="width: 390px">
                <button type="button" class="btn btn-primary m-r-sm" ng-click="next()">下一步</button>
                <button type="button" class="btn btn-default" ng-click="cancel()">取消</button>
            </div>
        </div>
        <div tab heading="详情" active="activeFlag[3]" ng-if="activeFlag[3]">
            <div class="m-t-sm form-up-tb clearfix">
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">计划单号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.planNo || '-'}}">
                        {{orderObj.headerInfo.planNo || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">采购类型：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.typeDesc || '-'}}">
                        {{orderObj.headerInfo.typeDesc || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">计划分类：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.planType || '-'}}">
                        {{orderObj.headerInfo.planType || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">状态：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.statusDesc || '-'}}">
                        {{orderObj.headerInfo.statusDesc || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">部门名称：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.deptName || '-'}}">
                        {{orderObj.headerInfo.deptName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">制单人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.createName || '-'}}">
                        {{orderObj.headerInfo.createName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">制单时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(orderObj.headerInfo.createTime |YbDate:'yyyy-MM-dd HH:mm:ss') || '-'}}">
                        {{(orderObj.headerInfo.createTime |YbDate:"yyyy-MM-dd HH:mm:ss") || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">备注：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.remark || '-'}}">
                        {{orderObj.headerInfo.remark || "-"}}
                    </div>
                </div>
            </div>
            <div class="panel-bar clearfix">
                <div class="pull-left">
                    <i></i>零件信息
                </div>
            </div>
            <div class="main-area d-b-60" style="top:155px;">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{viewTbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in viewTbConf.tableCol track by $index" width="{{itemCol.width}}">
                                    <div yb-thead-operate ng-model="itemCol" target-width="editMaterielConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="orderObj.materialList.length > 0">
                        <table class="table-fixed border-none" width="{{viewTbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in orderObj.materialList track by $index">
                                <td class="spill-dots" ng-repeat="itemCol in viewTbConf.tableCol track by $index"
                                    width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">
                                    {{item[itemCol.dataField]}}
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="orderObj.materialList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-default" ng-click="cancel()">返回</button>
            </div>
        </div>
        <div tab heading="编辑" active="activeFlag[4]" ng-if="activeFlag[4]">
            <form name="orderForm" class="m-t-sm form-horizontal form-up-tb border-b clearfix" novalidate>

                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">计划单号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.planNo || '-'}}">
                        {{orderObj.headerInfo.planNo || "-"}}
                    </div>
                </div>

                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">计划分类：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.planType || '-'}}">
                        {{orderObj.headerInfo.planType || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">状态：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.statusDesc || '-'}}">
                        {{orderObj.headerInfo.statusDesc || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">部门名称：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.deptName || '-'}}">
                        {{orderObj.headerInfo.deptName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">制单人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.createName || '-'}}">
                        {{orderObj.headerInfo.createName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">制单时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(orderObj.headerInfo.createTime |YbDate:'yyyy-MM-dd HH:mm:ss') || '-'}}">
                        {{(orderObj.headerInfo.createTime |YbDate:"yyyy-MM-dd HH:mm:ss") || '-'}}
                    </div>
                </div>

                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">采购类型：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.typeDesc || '-'}}">
                        {{orderObj.headerInfo.typeDesc || "-"}}
                    </div>
                </div>

                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 control-label max-w-100">备注：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="remark" class="form-control" ng-model="orderObj.headerInfo.remark" maxlength="200">
                    </div>
                </div>
            </form>


            <div class="main-area d-b-60" style="top:155px;">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{viewTbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in viewTbConf.tableCol track by $index" width="{{itemCol.width}}">
                                    <div yb-thead-operate ng-model="itemCol" target-width="editMaterielConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="orderObj.materialList.length > 0">
                        <table class="table-fixed border-none" width="{{viewTbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in orderObj.materialList track by $index">
                                <td class="spill-dots" ng-repeat="itemCol in viewTbConf.tableCol track by $index"
                                    width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">

                                    <div class="spill-dots" ng-if="!itemCol.needInput">
                                        {{item[itemCol.dataField]}}
                                    </div>
                                    <div ng-if="!!itemCol.needInput && itemCol.inputType === 'adjustQty'" class="td-edit pos-r">
                                        <input type="text" class="form-control" ng-model="item[itemCol.dataField]"
                                               ng-change="countTotal(item)" yb-number-input max="99999.999" disable-decimal="false" decimal-places="3"
                                               ng-class="{'error': item.qtyErr}">
                                        <!--<div class="pos-a tool-tips" ng-if="!!item.qtyErr">
                                            <i class="triangle"></i>
                                            <div class="msg">数量不能为空和0</div>
                                        </div>-->
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="orderObj.materialList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-primary" ng-click="saveData(urlTab.editAndSave)">保存</button>
                <button type="button" class="btn btn-primary" ng-click="saveData(urlTab.editAndCommit)">提交</button>
                <button type="button" class="btn btn-default" ng-click="cancel()">返回</button>
            </div>
        </div>
        <div tab heading="审核" active="activeFlag[5]" ng-if="activeFlag[5]">
            <div class="m-t-sm form-up-tb clearfix">
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">计划单号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.planNo || '-'}}">
                        {{orderObj.headerInfo.planNo || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">采购类型：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.typeDesc || '-'}}">
                        {{orderObj.headerInfo.typeDesc || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">计划分类：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.planType || '-'}}">
                        {{orderObj.headerInfo.planType || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">状态：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.statusDesc || '-'}}">
                        {{orderObj.headerInfo.statusDesc || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">部门名称：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.deptName || '-'}}">
                        {{orderObj.headerInfo.deptName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">制单人：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.createName || '-'}}">
                        {{orderObj.headerInfo.createName || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">制单时间：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{(orderObj.headerInfo.createTime |YbDate:'yyyy-MM-dd HH:mm:ss') || '-'}}">
                        {{(orderObj.headerInfo.createTime |YbDate:"yyyy-MM-dd HH:mm:ss") || '-'}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">备注：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.remark || '-'}}">
                        {{orderObj.headerInfo.remark || "-"}}
                    </div>
                </div>
            </div>
            <div class="panel-bar clearfix">
                <div class="pull-left">
                    <i></i>零件信息
                </div>
            </div>
            <div class="main-area d-b-60" style="top:155px;right: 240px;">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{viewTbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in viewTbConf.tableCol track by $index" width="{{itemCol.width}}">
                                    <div yb-thead-operate ng-model="itemCol" target-width="editMaterielConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="orderObj.materialList.length > 0">
                        <table class="table-fixed border-none" width="{{viewTbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in orderObj.materialList track by $index">
                                <td class="spill-dots" ng-repeat="itemCol in viewTbConf.tableCol track by $index"
                                    width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">
                                    {{item[itemCol.dataField]}}
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="orderObj.materialList.length === 0">暂时没有数据</div>
                </div>
            </div>

            <div class="main-area d-b-100" style="top:155px; left: auto; width: 225px;">
                <div class="main-wrap p-b-lg over-flow-h">
                    <textarea yb-word-count max-size="100" name="auditNote" class="form-control full" ng-model="orderObj.headerInfo.returnAdvice"
                              ng-class="{'error': !orderObj.headerInfo.returnAdvice && submitted}" placeholder="审核意见"></textarea>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-primary" ng-click="auditFn(auditEnum.Pass)">审核通过</button>
                <button type="button" class="btn btn-primary" ng-click="auditFn(auditEnum.NoPass)">返回修改</button>
                <button type="button" class="btn btn-default" ng-click="cancel()">返回</button>
            </div>
        </div>
        <div tab heading="新增" active="activeFlag[6]" ng-if="activeFlag[6]">
            <div class="m-t-sm form-up-tb clearfix">
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">采购类型：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.typeDesc || '-'}}">
                        {{orderObj.headerInfo.typeDesc || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">计划分类：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.headerInfo.planType || '-'}}">
                        {{orderObj.headerInfo.planType || "-"}}
                    </div>
                </div>
                <div class="form-group col-xs-3 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">备注：</label>
                    <div class="col-xs-8 wrapper-none">
                        <input type="text" name="remark" class="form-control" ng-model="orderObj.headerInfo.remark" maxlength="200">
                    </div>
                </div>
                <div class="form-group col-xs-12 m-b-sm">
                    <label class="col-xs-4 m-b-n text-right max-w-100">来源单号：</label>
                    <div class="col-xs-8 wrapper-none spill-dots" title="{{orderObj.sourcePlanNos || '-'}}">
                        <span ng-if="orderObj.sourcePlanNos && orderObj.sourcePlanNos.length > 0"
                              ng-repeat="item in orderObj.sourcePlanNos track by $index">
                            {{item}}<span ng-if="$index !== orderObj.sourcePlanNos.length - 1">，</span>
                        </span>
                        <span ng-if="!orderObj.sourcePlanNos || orderObj.sourcePlanNos.length == 0">-</span>
                    </div>
                </div>
            </div>
            <div class="panel-bar clearfix">
                <div class="pull-left">
                    <i></i>零件信息
                </div>
            </div>
            <div class="main-area d-b-60" style="top:155px;">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{viewTbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in viewTbConf.tableCol track by $index" width="{{itemCol.width}}">
                                    <div yb-thead-operate ng-model="itemCol" target-width="editMaterielConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="orderObj.materialList.length > 0">
                        <table class="table-fixed border-none" width="{{viewTbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in orderObj.materialList track by $index">
                                <td class="spill-dots" ng-repeat="itemCol in viewTbConf.tableCol track by $index"
                                    width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">

                                    <div class="spill-dots" ng-if="!itemCol.needInput">
                                        {{item[itemCol.dataField]}}
                                    </div>
                                    <div ng-if="!!itemCol.needInput && itemCol.inputType === 'adjustQty'" class="td-edit pos-r">
                                        <input type="text" class="form-control" ng-model="item[itemCol.dataField]"
                                               ng-change="countTotal(item)" yb-number-input max="99999.999" disable-decimal="false" decimal-places="3"
                                               ng-class="{'error': item.qtyErr}">
                                        <!--<div class="pos-a tool-tips" ng-if="!!item.qtyErr">
                                            <i class="triangle"></i>
                                            <div class="msg">数量不能为空和0</div>
                                        </div>-->
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="orderObj.materialList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area btn-bar text-center clearfix">
                <button type="button" class="btn btn-primary" ng-click="saveData(urlTab.addAndSave)">保存</button>
                <button type="button" class="btn btn-primary" ng-click="saveData(urlTab.addAndCommit)">提交</button>
                <button type="button" class="btn btn-default" ng-click="cancel()">返回</button>
            </div>
        </div>
    </div>
</div>
